package org.example.controller;

import com.github.pagehelper.PageInfo;
import org.example.entity.info_notice;
import org.example.service.info_noticeSerive;
import org.example.util.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("info_notice")
public class info_noticeController {
    @Autowired
    private info_noticeSerive info_noticeService;
    @GetMapping
    public R getNotice(info_notice info_notice,
                       @RequestParam(required = false,defaultValue = "1") int page,
                       @RequestParam(required = false,defaultValue = "10") int size){
        PageInfo<info_notice> infoNoticePageInfo = info_noticeService.getinfo_noticeById(info_notice, page, size);
        return R.ok(infoNoticePageInfo);
    }
}
